﻿importPackage(net.sf.cherry.client);
var status = 0;

var ttt ="#fUI/UIWindow.img/Quest/icon9/0#";
var xxx ="#fUI/UIWindow.img/Quest/icon8/0#";
var sss ="#fUI/UIWindow.img/QuestIcon/3/0#";


	function start() {
		status = -1;
		action(1, 0, 0);
		}
	function action(mode, type, selection) {
		if (mode == -1) {
		cm.dispose();
		} else {
		if (status >= 0 && mode == 0) {
		cm.dispose();
		return;
		}
		if (mode == 1)
		status++;
		else
		status--;


	if (status == 0) {

	    var textz = "\r\n 大姐大就在那里,你是要挑战它呢还是逃跑呢?\r\n";

		textz += "#b#L0#10个飞天猪的蛋.挑战大姐大BOSS#l\r\n";

		textz += "#b#L1#离开地图#l\r\n";

		cm.sendSimple (textz);  

			
	}else if (status == 1) {

	if (selection == 0){
		var party = cm.getPlayer().getParty();		
		if (party == null || party.getLeader().getId() != cm.getPlayer().getId()) {
                    cm.sendOk("你不是队长。请你们队长来说话吧！");
                    cm.dispose();
		}else if(party.getMembers().size() < 1) {
	            cm.sendOk("需要 2 人以上的组队才能召唤！!");
                    cm.dispose();
		}else if (cm.haveItem(4170001) < 1) {	
                             cm.sendOk("挑战大姐大BOSS必须要有20个#v4170001# \r\n#k");
cm.dispose();	
                        }else{
                        cm.gainItem(4170001,-10);
                        //怪物ID--血 --气--经验--怪物数量--X--Y
                        cm.spawnMonster(9400121,810,96);
                     
                        cm.dispose();
}

	}else if (selection == 1){
		cm.warpParty(701000210);
		cm.gainItem(1472244, 0);			
		cm.dispose();

}										
}
}
}

